package ua.kharkov.knure.mikhaylov.st4.web.jstl;

import ua.kharkov.knure.mikhaylov.st4.db.entities.User;
import ua.kharkov.knure.mikhaylov.st4.settings.LocaleData;

/**
 * Custom functions for tag library
 * 
 * @author Saint
 * 
 */
public class CustomFunctions {

	/**
	 * Forms the hello string with localized hello message and user name
	 * 
	 * @param user
	 *            - user (C.O.)
	 * @return the message
	 */
	public static String formHelloString(User user) {

		String hello = LocaleData.getResourceBundle().getString(
				"clientpage.label.hello")
				+ ", " + user.getFirstName() + "!";

		return hello;
	}

}
